<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--<script type="text/javascript" src="script/sms_asset_script.js"></script>-->
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script src="calendar/jquery-1.4.4.min.js"></script>
<script src="calendar/jquery.gvChart-1.0.1.min.js"></script>
<script type="text/javascript">
		gvChartInit();
		jQuery(document).ready(function(){

			jQuery('#myTable1').gvChart({
				chartType: 'PieChart',
				gvSettings: {
					vAxis: {title: '중요도 평가'},
					hAxis: {title: 'Month'},
					width: 720,
					height: 300
					}
			});
			
			jQuery('#myTable2').gvChart({
				chartType: 'PieChart',
				gvSettings: {
					vAxis: {title: '중요도 평가'},
					hAxis: {title: 'Month'},
					width: 720,
					height: 300
					}
			});

			jQuery('#myTable3').gvChart({
				chartType: 'PieChart',
				gvSettings: {
					vAxis: {title: '중요도 평가'},
					hAxis: {title: 'Month'},
					width: 720,
					height: 300
					}
			});

			jQuery('#myTable4').gvChart({
				chartType: 'PieChart',
				gvSettings: {
					vAxis: {title: '중요도 평가'},
					hAxis: {title: 'Month'},
					width: 720,
					height: 300
					}
			});

			jQuery('#myTable7').gvChart({
				chartType: 'BarChart',
				gvSettings: {
					vAxis: {title: '등급'},
					hAxis: {title: '대수'},
					width: 720,
					height: 300
					}
			});
			
		});
</script>
</head>
<body>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
		<tr>
			<th bgcolor="#cff8ff" valign="center" height="40px" align="center"><font size="4">자산 중요도 평가 등급</font></th>
		</tr>
		<tr>
			<td align="right"><!-- 버튼 -->
				<table border="0" cellspacing="0" cellpadding="0">
					<tr>
						   <td><a href="#" onclick=""><img src="img/print_btn.jpg" /></a></td>
						  <td><a href="#" onclick=""><img src="img/excel_btn.jpg" /></a></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
		<!-- 내용 테이블 -->
		<td>
			<table class="tb01" cellPadding="0" border="0" width="100%">
				<tr height="25px">
					<th width="150px">대상</th>
					<th width="70px">대수/비율</th>
					<th width="70px">1등급</th>
					<th width="70px">2등급</th>
					<th width="70px">3등급</th>
					<th width="70px">미결정</th>
					<th width="70px">총합</th>
					<th width="150px">전체자산대비비율</th>
					<th width="15px"></th>
				</tr>
			</table>
			<div style="overflow:auto; overflow-x: hidden; width: 100%; height: 393px">	
			<table class="tb01" cellPadding="0" border="0" width="100%">
				<c:choose>
				<c:when test="${fn:length(percentList)!= 0}">
					<c:forEach var="list" items="${requestScope.percentList}" varStatus="status">
						<tr height="25px">
							<td rowspan="2" width="150px">${list.asset_kind }</td>
							<td width="70px">대수</td>
							<td width="70px">${list.firstCount }</td>
							<td width="70px">${list.secondCount }</td>
							<td width="70px">${list.thirdCount }</td>
							<td width="70px">${list.pendencyCount }</td>
							<td width="70px">${list.assetNoTotalCount }</td>
							<td width="150px" rowspan="2" class="leftline">${list.totalGrade }%</td>
							<td width="15px" rowspan="2" class="alignright"></td>
						</tr>
						<tr>
							<td>비율</td>
							<td>${list.firstGrade }%</td>
							<td>${list.secondGrade }%</td>
							<td>${list.thirdGrade }%</td>
							<td>${list.pendencyGrade }%</td>
							<td>${list.assetNoTotalGrade }%	</td>
						</tr>
					</c:forEach>
				</c:when>
				<c:otherwise>
					<tr>
						<td align="center" colspan="8">-no data-</td>
					</tr>
				</c:otherwise>
				</c:choose>					
			</table>
			</div>	
			</td>
		</tr>
		<tr>
			<td>
			<c:forEach var="list1" items="${requestScope.percentList}" varStatus="status">
				<table id='myTable${status.index+1 }'>
				<caption>${list1.asset_kind }</caption>
				<thead>
					<tr>
						<th></th>
						<th>1등급</th>
						<th>2등급</th>
						<th>3등급</th>
						<th>미결정</th>
					</tr>
				</thead>
					<tbody>
					<tr>
						<th>2010</th>
						<td>${list1.firstCount }</td>
						<td>${list1.secondCount }</td>
						<td>${list1.thirdCount }</td>
						<td>${list1.pendencyCount }</td>
					</tr>
				</tbody>
		</table>
		</c:forEach>
			</td>
		</tr>
	</table>
				<table id='myTable7'>
				<caption>자산중요도 평가등급</caption>
				<thead>
					<tr>
						<th></th>
						<th>1등급</th>
						<th>2등급</th>
						<th>3등급</th>
						<th>미결정</th>
					</tr>
				</thead>
					<tbody>
					<c:forEach var="list2" items="${requestScope.percentList}" varStatus="status">
					<tr>
						<th>${list2.asset_kind }</th>
						<td>${list2.firstCount }</td>
						<td>${list2.secondCount }</td>
						<td>${list2.thirdCount }</td>
						<td>${list2.pendencyCount }</td>
					</tr>
					</c:forEach>
				</tbody>
			</table>
</body>
</html>